--- # Only the main Sass file needs front matter (the dashes are enough) --- // Custom variables for SynerGen-AI theme
$primary-color: #2c3e50;
$secondary-color: #3498db;
$accent-color: #e74c3c;
$text-color: #2c3e50;
$background-color: #ffffff;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);

// Typography
$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;

// Spacing
$spacing-unit: 30px;

// Layout
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;

// Mixins
@mixin media-query($device) {
    @media screen and (max-width: $device) {
        @content;
    }
}

@mixin relative-font-size($ratio) {
    font-size: $base-font-size * $ratio;
}

// Base styles
body {
    font: $base-font-weight #{($base-font-size / $base-line-height)} $base-font-family;
    color: $text-color;
    background-color: $background-color;
    -webkit-text-size-adjust: 100%;
    -webkit-font-feature-settings: "kern" 1;
    -moz-font-feature-settings: "kern" 1;
    -o-font-feature-settings: "kern" 1;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

// Reset some basic elements
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
dl,
dd,
ol,
ul,
figure {
    margin: 0;
    padding: 0;
}

// Basic styling
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: $base-font-weight;
}

links {
    color: $primary-color;
    text-decoration: none;

    &:visited {
        color: darken($primary-color, 15%);
    }

    &:hover {
        color: $text-color;
        text-decoration: underline;
    }
}

// Blockquotes
blockquote {
    color: $grey-color;
    border-left: 4px solid $grey-color-light;
    padding-left: ($spacing-unit / 2);
    @include relative-font-size(1.125);
    letter-spacing: -1px;
    font-style: italic;

    > :last-child {
        margin-bottom: 0;
    }
}

// Code formatting
pre,
code {
    @include relative-font-size(0.9375);
    border: 1px solid $grey-color-light;
    border-radius: 3px;
    background-color: #eef;
}

code {
    padding: 1px 5px;
}

pre {
    padding: 8px 12px;
    overflow-x: auto;

    >code {
        border: 0;
        padding-right: 0;
        padding-left: 0;
    }
}

// Wrapper
.wrapper {
    max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
    margin-right: auto;
    margin-left: auto;
    padding-right: $spacing-unit;
    padding-left: $spacing-unit;
    @extend %clearfix;

    @include media-query($on-laptop) {
        max-width: calc(#{$content-width} - (#{$spacing-unit}));
        padding-right: ($spacing-unit / 2);
        padding-left: ($spacing-unit / 2);
    }
}

// Clearfix
%clearfix:after {
    content: "";
    display: table;
    clear: both;
}

// Icons
.orange {
    color: #f66a0a;
}

.grey {
    color: $grey-color;
}

.svg-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    fill: #{$grey-color};
    padding-right: 5px;
    vertical-align: text-top;
}

// Tables
table {
    margin-bottom: $spacing-unit;
    width: 100%;
    text-align: left;
    color: lighten($text-color, 18%);
    border-collapse: collapse;
    border: 1px solid $grey-color-light;

    tr {
        &:nth-child(even) {
            background-color: lighten($grey-color-light, 6%);
        }
    }

    th,
    td {
        padding: ($spacing-unit / 3) ($spacing-unit / 2);
    }

    th {
        background-color: lighten($grey-color-light, 3%);
        border: 1px solid darken($grey-color, 13%);
        border-bottom-color: darken($grey-color, 25%);
    }

    td {
        border: 1px solid $grey-color-light;
    }
}

// Site header
.site-header {
    border-top: 5px solid $grey-color-dark;
    border-bottom: 1px solid $grey-color-light;
    min-height: $spacing-unit * 1.865;
    position: relative;
}

.site-title {
    @include relative-font-size(1.625);
    font-weight: 300;
    line-height: $base-line-height * $base-font-size * 2.25;
    letter-spacing: -1px;
    margin-bottom: 0;
    float: left;

    &,
    &:visited {
        color: $grey-color-dark;
    }
}

.site-nav {
    float: right;
    line-height: $base-line-height * $base-font-size * 2.25;

    .nav-trigger {
        display: none;
    }

    .menu-icon {
        display: none;
    }

    .page-link {
        color: $text-color;
        line-height: $base-line-height;

        &:not(:last-child) {
            margin-right: 20px;
        }
    }

    @include media-query($on-palm) {
        position: absolute;
        top: 9px;
        right: ($spacing-unit / 2);
        background-color: $background-color;
        border: 1px solid $grey-color-light;
        border-radius: 5px;
        text-align: right;

        label[for="nav-trigger"] {
            display: block;
            float: right;
            width: 36px;
            height: 36px;
            z-index: 2;
            cursor: pointer;
        }

        .menu-icon {
            display: block;
            float: right;
            width: 36px;
            height: 26px;
            line-height: 0;
            padding-top: 10px;
            text-align: center;

            >svg {
                fill: $grey-color-dark;
            }
        }

        input~.trigger {
            clear: both;
            display: none;
        }

        input:checked~.trigger {
            display: block;
            padding-bottom: 5px;
        }

        .page-link {
            display: block;
            padding: 5px 10px;

            &:not(:last-child) {
                margin-right: 0;
            }

            margin-left: 20px;
        }
    }
}

// Site footer
.site-footer {
    border-top: 1px solid $grey-color-light;
    padding: $spacing-unit 0;
}

.footer-heading {
    @include relative-font-size(1.125);
    margin-bottom: ($spacing-unit / 2);
}

.contact-list,
.social-media-list {
    list-style: none;
    margin-left: 0;
}

.footer-col-wrapper {
    @include relative-font-size(0.9375);
    color: $grey-color;
    margin-left: (-$spacing-unit / 2);
    @extend %clearfix;
}

.footer-col {
    float: left;
    margin-bottom: ($spacing-unit / 2);
    padding-left: ($spacing-unit / 2);
}

.footer-col-1 {
    width: calc(35% - (#{$spacing-unit / 2}));
}

.footer-col-2 {
    width: calc(20% - (#{$spacing-unit / 2}));
}

.footer-col-3 {
    width: calc(45% - (#{$spacing-unit / 2}));
}

@include media-query($on-laptop) {

    .footer-col-1,
    .footer-col-2 {
        width: calc(50% - (#{$spacing-unit / 2}));
    }

    .footer-col-3 {
        width: calc(100% - (#{$spacing-unit / 2}));
    }
}